import { observable, action } from 'mobx-miniprogram'
const { getMaxNestingLevel } = require('../utils/util')

export const store = observable({
  // 表格嵌套层级，默认为1
  columnsCj: 1,
  computeCj: action(function (columns) {
    this.columnsCj = getMaxNestingLevel(columns)
  })
})